Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(ui/pull-refresh): add class #399

Merged
merged 4 commits into from
Apr 5, 2022
Merged

perf(ui/pull-refresh): add class #399

merged 4 commits into from
Apr 5, 2022

Conversation

wangKBweb
Copy link
Member

Checklist


  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information


@github-actions
Copy link

github-actions bot commented Apr 5, 2022

@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2022

Codecov Report

Merging #399 (c3f0aa9) into dev (687d791) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #399   +/-   ##
=======================================
  Coverage   96.48%   96.49%           
=======================================
  Files         217      217           
  Lines        5098     5107    +9     
  Branches      987      981    -6     
=======================================
+ Hits         4919     4928    +9     
  Misses        175      175           
  Partials        4        4           
Impacted Files Coverage Δ
packages/varlet-ui/src/pagination/Pagination.vue 98.13% <100.00%> (+0.03%) ⬆️
packages/varlet-ui/src/popup/Popup.tsx 100.00% <100.00%> (ø)
...ackages/varlet-ui/src/pull-refresh/PullRefresh.vue 100.00% <100.00%> (ø)
packages/varlet-ui/src/dialog/Dialog.vue 100.00% <0.00%> (ø)
packages/varlet-ui/src/tab-item/TabItem.vue 100.00% <0.00%> (ø)
...rlet-ui/src/bottom-navigation/BottomNavigation.vue 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 687d791...c3f0aa9. Read the comment docs.

@@ -45,7 +47,7 @@ export default defineComponent({

return (
<div
class={['var-popup__overlay', overlayClass]}
class={[classes(n('overlay')), overlayClass]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这地方直接都用classes包起来吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

包起来报错了浩哥

@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
@touchcancel="touchEnd"
>
<div
class="var-pull-refresh__control var-elevation--2"
:class="[isSuccess ? 'var-pull-refresh__control-success' : null]"
:class="classes(n('control'), 'var-elevation--2', isSuccess ? n('control-success') : '')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

条件判断用数组

<var-icon
:name="iconName"
:transition="200"
:class="classes(n('icon'), refreshStatus === 'loading' ? n('animation') : '')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里和上面一样

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改好惹

@BeADre BeADre merged commit e874763 into varletjs:dev Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants